package com.cloud.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cloud.bean.Type;
import com.cloud.service.TypeService;

@Controller
public class TypeController {

	@Autowired
	TypeService typeService;
	
	@RequestMapping("/type/selectAll")
	public String selectAll(Model model){
		List<Type> types = typeService.selectProductsOfType();
		model.addAttribute("types", types);
		System.out.println(types);
		return "typeList";
	}
	
}
